package statemachine

type StateMachineState string
type StateMachineStateEvent string

const (
	StateMachineStateUnknow      = StateMachineState("")
	StateMachineStateEventUnknow = StateMachineStateEvent("")
)

type StateMachine interface {
	AddTranscation(old StateMachineState, evt StateMachineStateEvent, next StateMachineState)
	GetNextState(old StateMachineState, evt StateMachineStateEvent) (StateMachineState, error)
	AddListener(l StateMachineListener)
	RemoveListener(l StateMachineListener)
	FireBeforeListener(old StateMachineState, evt StateMachineStateEvent, next StateMachineState, args ...any) error
	FireAfterListener(prev StateMachineState, evt StateMachineStateEvent, curr StateMachineState, args ...any) error
}
